from .http_utils import *


def login_pc(uname, pwd):
    res = http_post('/crm/auth/login', {'account': uname, 'password': pwd, 'platform': 1})
    BaseInfo.login.set_pc_info(res)
    return res


def login_app(uname, pwd):
    res = http_post("/crm/auth/accountLogin/doLogin", {'account': uname, 'password': pwd, 'platform': 0})
    BaseInfo.login.set_app_info(res)
    return res


def crm_supplier_bank_and_type_by_id(org_id):
    """
    查询供应商银行卡信息
    :param org_id:
    :return:
    """

    res = http_get("crm/client/supplierBankAndTypeById", {'orgId': org_id})

    return res['data']
